package com.lgy.jms;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

public class ConsumerMessageListener implements MessageListener {
	@Override
	public void onMessage(Message message) {
		TextMessage tm = (TextMessage) message;
		try {
			String text = tm.getText();
			
			System.out.println(">>>>>>>>>>>>>>消费者收到的消息内容：" + text);
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}

}
